Array analysis for Valerie Schumacher (Valerie.Schumacher@childrens.harvard.edu), Schumacher group at HMS.
Contact John Hutchinson (jhutchin@hsph.harvard.edu) for additional details.
The most recent update of this html document occurred: Thu Jan 5 16:27:29 2017
The sections below provide code to reproduce the included results and plots.
Working directories, files and other variables necessary to the analysis.
Bioconductor and R libraries used to process and visualize the data.
| treatment | pulldown | replicate | source | sampleID | group | run | |
|---|---|---|---|---|---|---|---|
| wt1_whole-1 | pulldown | Wt1 | 1 | whole_RNA | wt1_whole-1 | wt1_whole | 1 |
| input_whole-1 | input | input | 1 | whole_RNA | input_whole-1 | input_whole | 1 |
| input_whole-2 | input | input | 2 | whole_RNA | input_whole-2 | input_whole | 1 |
| input_whole-3 | input | input | 3 | whole_RNA | input_whole-3 | input_whole | 1 |
| stau2_whole-1 | pulldown | stau2 | 1 | whole_RNA | stau2_whole-1 | stau2_whole | 1 |
| stau2_whole-2 | pulldown | stau2 | 2 | whole_RNA | stau2_whole-2 | stau2_whole | 1 |
| stau2_whole-3 | pulldown | stau2 | 3 | whole_RNA | stau2_whole-3 | stau2_whole | 1 |
| input_mrna-1 | input | input | 1 | mRNA | input_mrna-1 | input-mrna | 2 |
| stau2-whole-3 | pulldown | stau2 | 3 | whole_RNA | stau2-whole-3 | stau2-whole | 2 |
background correct and normalize data with RMA (Bolstad et al. 2003)
summarize probesets on the gene (‘core’) level
The arrays look good, and the clustering looks very good.
The goal of these analyses are to naiively evaluate the variability within the raw data and determine whether this variability can predict the different sample groups
The first method produces a dendrogram by performing
> a hierarchical cluster analysis using a set of dissimilarities for the n objects being clustered
Here, I’ve fist highlighted which input sample was mRNA, and then highlighted the different pulldown categories.
This second approach is a dimension reduction and visualisation technique that is used to project the multivariate (i.e.multiple genes) data vector of each array into a lower-dimensional plot, such that the spatial arrangement of the points in the plot reflects the overall data (dis)similarity between the arrays. The data is typically reduced to a small number of dimensions (or components) which explain most of the sample variability. This Youtube slideshow gives a pretty good basic explanation of what PCA is doing.
Here, each point depicts the amount of variation explained by each component and the line shows the cumulative amount. For this data set, very few dimensions (3) can explain >75% of the variation observed in the samples.
As plots with more than 2 dimensions are difficult to visualize, we typically split up the dimensions/components and plot them pairwise against each other; the plots here show scatterplots of the arrays along all dual combinations of the first three principal components. In the first plot, each sample group is represented by a separate color and in the second plot each sample is represented by a different color.
You can use these plots to explore if the arrays cluster, find outliers, and determine whether this is according to an intended experimental factor or according to unintended causes such as batch effects. In these plots, I have once again first highlighted the RNA source (mRNA or whole RNA) and then highlighted the individual pulldown categories.
There is a high degree of clustering by pulldown type. So much so, that when you plot PC1 against PC2, both the input samples and stau2 samples largely overlap their respective sample groups. These results are consistent with a lower level of biological variation, likely resulting from the use of a single cell line for the experiment, making these replicates closer to technical replicates. The single input sample outlier is the mRNA sample.
These unsupervised clustering resutls reveal that the mRNA input sample has clear differences from the whole RNA input samples, more than can be attributed to batch effect, given how closely the Stau2 pulldown whole RNA repeat sample from the same run clusters with the Stau2 whole RNA samples from the first run.
The whole RNA and mRNA input RNA samples were run on different days and may show batch effects. As an identical sample was also run both days, we can try adjusting for batch using ComBat r citep(“doi: 10.1093/biostatistics/kxj037”) from the sva package and see if it improves the data clustering.
## Found 2 batches
## Adjusting for 0 covariate(s) or covariate level(s)
## Standardizing Data across genes
## Fitting L/S model and finding priors
## Finding parametric adjustments
## Adjusting the Data
Based on the low variation within the Stau2 group before batch correction (look back to the first PCA plot) there does not appear to be much need for batch correction. In fact, the PCA plot after batch correction shows an undesirable loss of signal (and averaging betweeen samples), potentially due to the lack of inclusion of a repeated input sample. Given this, I decided to skip batch correction for this analysis.
Continuing forward, I removed the repeated Stau2 whole RNA sample.
So far we have only been working with the probesets,without reference to the genes they assay. Here we load in metadata about the probesets on the array (feature data), the gene symbols in particular.
Reducing the number of genes assayed reduces the multiple test correction and may allow us to identify more differentially expressed genes.
Starting with 35556 probes remaining we can filter:
22701 probes remaining
21894 probes remaining
20184 probes remaining
18165 probes remaining
A linear model for microarray data analysis (Limma) was performed on the samples to identify differentially expressed genes for comparisons of the sample groups. Limma fits a linear model to the expression data for all samples for each gene and is designed to handle complex experiments involving comparisons between many RNA targets simultaneously.
To perform limma, we construct two matrices. The design matrix provides a representation of the different sample groups which have been analysed. The contrast matrix allows the coefficients defined by the design matrix to be combined into contrasts of interest.
a one or a zero indicate respectively, that a sample either belongs or does not belong to the sample group
| inp | ut_whole inp | ut_mrna sta | u2_whole wt1 | _whole |
|---|---|---|---|---|
| wt1_whole-1 | 0 | 0 | 0 | 1 |
| input_whole-1 | 1 | 0 | 0 | 0 |
| input_whole-2 | 1 | 0 | 0 | 0 |
| input_whole-3 | 1 | 0 | 0 | 0 |
| stau2_whole-1 | 0 | 0 | 1 | 0 |
| stau2_whole-2 | 0 | 0 | 1 | 0 |
| stau2_whole-3 | 0 | 0 | 1 | 0 |
| input_mrna-1 | 0 | 1 | 0 | 0 |
I setup four contrasts, two to select genes that show a significant expression change between the input (both mRNA and whole RNA) and pulldown Stau2 samples and two to select genes that show a significant expression change between the input (both mRNA and whole RNA) and pulldown WT1 samples.
| stau2_whole | stau2_mRNA | wt1_whole | wt1_mRNA | |
|---|---|---|---|---|
| input_whole | -1 | 0 | -1 | 0 |
| input_mrna | 0 | -1 | 0 | -1 |
| stau2_whole | 1 | 1 | 0 | 0 |
| wt1_whole | 0 | 0 | 1 | 1 |
These matrices are used to fit a linear model to the data. The linear model is applied and pairwise comparisons are performed to identify differentially expressed genes.
Compute estimated coefficients and standard errors for contrasts
Compute moderated t-statistics and log-odds of differential expression
## [[1]]
## NULL
##
## [[2]]
## NULL
##
## [[3]]
## NULL
##
## [[4]]
## NULL
Note that for all these files, I have not summarized values for genes assayed by multiple probes (i.e. by taking the median value), so you may see multiple instances of the same gene in the results
Stau2 whole RNA pulldown stats - all genes
WT1 whole RNA pulldown stats - all genes
These summary tables contain the following information:
Here we can visulize the relationship between the fold changes in expression observed for the different pulldowns. Our best candidate genes will not only have a statistically significant difference in gene expression between the two sample groups (as measured adjusted pvlaue) but also a large change (as measured by the log2 fold change). We are also only interested in genes that are enriched after pulldown, not those that are higher in the input samples.
Each of these plots contains 3 subplots:
Bottom left - the volcano plot, a scatter plot with the observed log2fold changes (extremes are better) plotted against the -log10 adjusted pvalues (higher is better). For these contrasts, we are looking for genes that are enriched in the pulldown, genes that have at least an adjusted pvalue of 0.05 and a log 2 fold change more than 0.5849625 are highlighted with a green box.
Upper left - a density plot (smoothed histogram) of the log2 fold changes observed for the contrast, the part of the distribution above 0.5849625 is highlighted under the curve in green.
Lower right - a density plot (smoothed histogram) of the adjusted pvalued observed for the contrast, the part of the distribution above 0.05 is highlighted under the curve in green. Note that for this plot, this highlight also included genes enriched in the input samples.